﻿<r:RibbonWindow x:Class="SourceControlMonitor.Views.ShellView"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:tc="clr-namespace:Transitionals.Controls;assembly=Transitionals"
                Background="{DynamicResource WindowBackgroundBrush}"
                xmlns:transt="clr-namespace:Transitionals.Transitions;assembly=Transitionals"
                xmlns:local="clr-namespace:SourceControlMonitor.Views"
                xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification"
                xmlns:r="clr-namespace:Fluent;assembly=Fluent" 
                xmlns:helpers="clr-namespace:SourceControlMonitor.Helpers"
                Title="Source Control Monitor"
                WindowStartupLocation="CenterScreen"
                Height="550" 
                Width="1100">
    <r:RibbonWindow.Resources>
        <ResourceDictionary>
            <Style TargetType="ContentControl">
                <Setter Property="HorizontalAlignment" Value="Stretch" />
                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                <Setter Property="VerticalAlignment" Value="Stretch" />
                <Setter Property="VerticalContentAlignment" Value="Stretch" />
            </Style>
        </ResourceDictionary>
    </r:RibbonWindow.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <tb:TaskbarIcon x:Name="notifyIcon" 
                        IconSource="../Resources/SourceControlMonitor.ico" 
                        Visibility="Collapsed"
                        TrayBalloonTipClicked="OnDoubleClick"
                        LeftClickCommand="{Binding OnClick}" 
                        DoubleClickCommand="{Binding OnDoubleClick}"
                        TrayMouseDoubleClick="OnDoubleClick"
                        helpers:BalloonHelper.BalloonContext="{Binding BalloonContext}"
                        ToolTipText="MVVM Source Control Monitor">
            <tb:TaskbarIcon.TrayToolTip>
                <local:NotifyToolTip Background="Transparent" />
            </tb:TaskbarIcon.TrayToolTip>
            <tb:TaskbarIcon.ContextMenu>
                <ContextMenu Style="{x:Null}">
                    <MenuItem Style="{x:Null}" Header="Exit" Click="OnExitClick" />
                    <MenuItem Style="{x:Null}" Header="Show Window" Click="OnDoubleClick" />
                </ContextMenu>
            </tb:TaskbarIcon.ContextMenu>
        </tb:TaskbarIcon>
        <ContentControl Grid.Row="0" Grid.ColumnSpan="2" Content="{Binding MenuView}" />
        <Expander ExpandDirection="Left" Grid.Row="1" IsExpanded="True" Header="Repositories">
            <Expander.Content>
                <ContentControl Content="{Binding RepositoriesView}" Width="175" />
            </Expander.Content>
        </Expander>
        <tc:TransitionElement Grid.Row="1" Grid.Column="1" TransitionsEnabled="True" Content="{Binding MainView}">
            <tc:TransitionElement.Transition>
                <transt:TranslateTransition StartPoint="1,0" EndPoint="0,1" Duration="0:0:0.250"/>
            </tc:TransitionElement.Transition>
        </tc:TransitionElement>
        <xctk:BusyIndicator Grid.ColumnSpan="2" Grid.RowSpan="2" IsBusy="{Binding IsBusy, FallbackValue=False}" BusyContent="{Binding IsBusyText, FallbackValue='Wait for it...'}" />
        <xctk:ChildWindow CloseButtonStyle="{x:Null}" Name="childWindow" WindowState="{Binding ChildWindowState}" Grid.RowSpan="2" Grid.ColumnSpan="2" WindowStartupLocation="Center" IsModal="True" Content="{Binding ChildWindowContent}" />
    </Grid>
</r:RibbonWindow>
